<?php

namespace common\entities\myhtsq;

use Yii;
use common\error\ErrorCode;

/**
 * This is the model class for table "ztc_role_user".
 *
 * @property integer $role_user_id
 * @property integer $role_id
 * @property string $user_id
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 */
class RoleUserEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_role_user';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['role_id', 'user_id'], 'required'],
            [['role_id'], 'integer'],
            [['created_on', 'modified_on'], 'safe'],
            [['user_id'], 'string', 'max' => 36],
            [['created_by', 'modified_by'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'role_user_id' => 'Role User ID',
            'role_id' => 'Role ID',
            'user_id' => 'User ID',
            'created_on' => 'Created On',
            'created_by' => 'Created By',
            'modified_on' => 'Modified On',
            'modified_by' => 'Modified By',
        ];
    }    
    
}
